home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic 5 Developer's Kit / vb5 dev kit.iso / dev / desaware / stgtools / stg_demo / nameinpt.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-10-13  |  2.6 KB  |  91 lines

  1. VERSION 4.00
  2. Begin VB.Form NameInpt 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "Rename Element"
  5.    ClientHeight    =   2070
  6.    ClientLeft      =   3810
  7.    ClientTop       =   5115
  8.    ClientWidth     =   3600
  9.    ClipControls    =   0   'False
  10.    Height          =   2535
  11.    Left            =   3720
  12.    LinkTopic       =   "Form1"
  13.    MaxButton       =   0   'False
  14.    MinButton       =   0   'False
  15.    ScaleHeight     =   2070
  16.    ScaleWidth      =   3600
  17.    Top             =   4740
  18.    Width           =   3780
  19.    Begin VB.CommandButton CancelBtn 
  20.       Cancel          =   -1  'True
  21.       Caption         =   "Cancel"
  22.       Height          =   375
  23.       Left            =   960
  24.       TabIndex        =   5
  25.       Top             =   1560
  26.       Width           =   1215
  27.    End
  28.    Begin VB.CommandButton OKBtn 
  29.       Caption         =   "OK"
  30.       Default         =   -1  'True
  31.       Height          =   375
  32.       Left            =   2280
  33.       TabIndex        =   4
  34.       Top             =   1560
  35.       Width           =   1215
  36.    End
  37.    Begin VB.TextBox NewText 
  38.       Height          =   285
  39.       Left            =   360
  40.       TabIndex        =   3
  41.       Top             =   960
  42.       Width           =   2655
  43.    End
  44.    Begin VB.TextBox OldText 
  45.       Enabled         =   0   'False
  46.       Height          =   285
  47.       Left            =   360
  48.       Locked          =   -1  'True
  49.       TabIndex        =   1
  50.       Top             =   360
  51.       Width           =   2655
  52.    End
  53.    Begin VB.Label Label2 
  54.       BackStyle       =   0  'Transparent
  55.       Caption         =   "New Name:"
  56.       Height          =   255
  57.       Left            =   120
  58.       TabIndex        =   2
  59.       Top             =   720
  60.       Width           =   1215
  61.    End
  62.    Begin VB.Label Label1 
  63.       BackStyle       =   0  'Transparent
  64.       Caption         =   "Old Name:"
  65.       Height          =   255
  66.       Left            =   120
  67.       TabIndex        =   0
  68.       Top             =   120
  69.       Width           =   975
  70.    End
  71. Attribute VB_Name = "NameInpt"
  72. Attribute VB_Creatable = False
  73. Attribute VB_Exposed = False
  74. Option Explicit
  75. Private Sub CancelBtn_Click()
  76.     GlobalResult = False
  77.     Unload NameInpt
  78. End Sub
  79. Private Sub Form_Load()
  80.     OldText.text = GlobalText
  81.     If Asc(Mid(OldText.text, 1, 1)) < 32 Then
  82.         NewText.text = Mid(OldText.text, 1, 1)
  83.         NewText.SelStart = 2 ' Move caret over
  84.     End If
  85. End Sub
  86. Private Sub OKBtn_Click()
  87.     GlobalResult = True
  88.     GlobalText = NewText.text
  89.     Unload NameInpt
  90. End Sub
  91.